package rabbitMQ.mq;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;
import rabbitMQ.config.RabbitConfig;


@Component
public class ReceiveHandler {
    @RabbitListener(queues ={RabbitConfig.QUEUE_INFORM_EMAIL})
    public void receive(String msg, Message message, Channel channel){
        System.out.println(msg);
        System.out.println(message.toString());
        System.out.println(channel.getChannelNumber());
    }
}
